﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LuKou.Shopspace.Domains;
using LuKou.Web.BLL.Service;
using LuKou.Member.Domains;
using LuKou.Common.Domains;

namespace LuKou.Web.BLL.Extensions
{
    public static class VendorShopMemberExt
    {
        /// <summary>
        /// 获取店铺的用户信息
        /// </summary>
        /// <param name="shop"></param>
        /// <returns></returns>
        public static User GetUserInfo(this VendorShopMember vendorShopMember)
        {
            User result = UserService.GetUserInfoById(vendorShopMember.AgentsUserID);
            if (null == result)
            {
                result = new User();
            }
            return result;
        }

        public static AgentsGrade GetAgentsGradeInfo(this VendorShopMember vendorShopMember)
        {
            AgentsGrade result = AgentsGradeService.GetAgentsGradeInfo(vendorShopMember.AgentsUserID);
            if (null == result)
            {
                result = new AgentsGrade();
            }
            return result;
        }
    }
}
